package day6;

import day4.teacher.MathTeacher;
import day4.teacher.PETeacher;
import day4.teacher.Teacher;

import java.util.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class ListTest2 {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        list.add("柿子");
        list.add("苹果");
        //list.add(4.65);
        String s = list.get(1);
        System.out.println(s);
        System.out.println(">>>>>>>>>>>>>>>");
        List<Teacher> l2=new ArrayList<>();
        l2.add(new MathTeacher("小黄",24));
        l2.add(new MathTeacher("老黄",44));
        l2.add(new PETeacher("小张",24));
        System.out.println(l2);
        MathTeacher m2=new MathTeacher("老黄",34);
        boolean b2=l2.contains(m2);
        System.out.println("老黄在吗？"+b2);

    }
}
